package com.java.demo5;

public class AnimalDemo {
    public static void main(String[] args) {

        Cat cat1 = new Cat("Tom1",2);
        Cat cat2 = new Cat("Tom2",4);
        System.out.println(cat1);
        System.out.println(cat2);

        Dog dog = new Dog();
        dog.setName("Dog");
        dog.setAge(2);
        System.out.println(dog);
    }
}
